<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>首页</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<div class="container"  id="content">
    <section class="content-header">
        <h1>
            <i class="fa fa-users"></i>
            <strong>公司信息发布</strong>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-home "></i>Home</a></li>
            <li>公司信息发布</li>
            <li class="active">信息发布</li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="box box-info">
            <div class="box-body">
                <div class="form-inline">
                    <div class="input-group">
                        <input type="text" id="keyword" class="form-control" placeholder="search..." style="width: 240px;" />
                        <span class="input-group-btn">
                        <button th:if="${module.canRead==true}" type="button" title="查询" class="btn btn-info searchBtn">查询</button>
                        <button th:if="${module.canRead==true}" type="button" name="reset" id="reset-btn" class="btn btn-info resetBtn">撤消</button>
                        </span>
                    </div>
                    <div class="form-group pull-right">
                    	<button th:if="${module.canRead==true}"   type="button" class="btn btn-info  pull-right seeBtn">查看</button>
                        <button th:if="${module.canRead==true}"   type="button" class="btn btn-info  pull-right download">附件下载</button>
                        <button th:if="${module.canAdd==true}"    type="button" class="btn btn-info pull-right publishedBtn">发布</button>
                        <button th:if="${module.canDelete==true}"  type="button" class="btn btn-info  pull-right  delBtn" >删除</button>
                        <button th:if="${module.canModify==true}"  type="button" class="btn btn-info  pull-right  editBtn">编辑</button>
                        <button th:if="${module.canAdd==true}"  type="button" class="btn btn-info pull-right addBtn">添加</button>
                    </div>
                </div>
            </div>
            <div class="box box-body">
                <table width="100%" id="dataTable" class="mytable dataTable table-bordered text-center table-striped table-hover">
                    <thead>
                    <tr>
                        <th width="8%">序号</th>
                        <th width="8%"><input type="checkbox" id="checkAll"/></th>
                        <th width="10%">标题</th>
                        <th width="8%">类型</th>
                        <th width="30%">内容</th>
                         <th width="10%">附件个数</th>
                         <th width="7%">查看次数</th>
                        <th width="6%">发布状态</th>
                        <th width="10%">发布时间</th>

                    </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
            </div>
        </div>
    </section>
    <!--公司信息发布弹窗-->
    <div class="modal" id="newsModal">
        <div class="modal-dialog" role="dialog">
            <form id="newsEditForm">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title"><strong>公司信息发布</strong></h4>
                    </div>

                    <div class="modal-body">
                        <input type="hidden" name="id" id="id" />
                        <input type="hidden" name="createTime" id="createTime" th:value="${nowDate}"/>
                        <div class="form-horizontal">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">标题</label>
                                <div class="col-sm-4">
                                    <div class="col-md-11">
                                        <input class="form-control"  type="text" name="title"  id="title"  datatype="*,*1-100"  nullmsg="请输入标题" />
                                    </div>
                                    <div class="col-md-1">
                                        <span style="color:#F00;fontsize:30px">*</span>
                                    </div>
                                </div>
                                <label class="col-sm-2 control-label">类型</label>
                                <div class="col-sm-4">
                                    <div class="col-md-11">
                                        <select class="form-control" id="type" name="type">
                                            <option th:each="type:${types}"
                                                    th:text="${type.title}"
                                                    th:value="${type.title}"></option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">内容</label>
                                <div class="col-sm-10">
                                    <div class="col-md-12">
                                        <textarea class="form-control" type="text" name="content" id="content" datatype="*1-2000" rows="3"></textarea>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">附件</label>
                                <div class="col-sm-10">
                                    <div class="col-md-11">
                                        <button type="button" class="btn btn-sm btn-info upload">上传附件 </button>
                                        <button type="button" class="btn btn-sm btn-info downList">下载附件 </button>
                                       <!--  <span id="newANum" class="badge label-pill label-primary">0</span> -->
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary saveBtn" >保存</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">返回</button>

                    </div>
                </div>
            </form>
        </div>
    </div>
    <!--公司信息查看弹窗-->
    <div class="modal" id="seeModal">
        <div class="modal-dialog" role="dialog">
            <form id="newsSeeForm">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title"><strong>公司信息发布</strong></h4>
                    </div>

                    <div class="modal-body">

                        <div class="form-horizontal">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">标题</label>
                                <div class="col-sm-4">
                                    <div class="col-md-11">
                                        <input class="form-control"  type="text" name="title"  id="titleSee"  readonly="readonly"/>
                                    </div>
                                    
                                </div>
                                <label class="col-sm-2 control-label">类型</label>
                                <div class="col-sm-4">
                                    <div class="col-md-11">
                                        <input class="form-control"  type="text" name="type"  id="typeSee"  readonly="readonly"/>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">内容</label>
                                <div class="col-sm-10">
                                    <div class="col-md-12">
                                        <textarea class="form-control" type="text" name="content" id="contentSee" datatype="*1-100" rows="3" readonly="readonly"></textarea>
                                    </div>
                                </div>
                            </div>
                            
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <script th:src="@{/news/newsindex.js}"></script>
</div>

</body>
</html>